import 'package:json_annotation/json_annotation.dart';

part 'collection_entity.g.dart';

@JsonSerializable()
class CollectionEntity {
  int? total;
  int? pages;
  int? limit;
  int? page;
  List<CollectionList>? xList;

  CollectionEntity({
    this.total,
    this.pages,
    this.limit,
    this.page,
    this.xList,
  });

  factory CollectionEntity.fromJson(Map<String, dynamic> json) => _$CollectionEntityFromJson(json);

  Map<String, dynamic> toJson() => _$CollectionEntityToJson(this);
}

@JsonSerializable()
class CollectionList {
  String? brief;
  String? picUrl;
  int? valueId;
  String? name;
  int? id;
  int? type;
  double? retailPrice;

  CollectionList({
    this.brief,
    this.picUrl,
    this.valueId,
    this.name,
    this.id,
    this.type,
    this.retailPrice,
  });

  factory CollectionList.fromJson(Map<String, dynamic> json) => _$CollectionListFromJson(json);

  Map<String, dynamic> toJson() => _$CollectionListToJson(this);
}